using System.Net;
using System.Net.Quic;
using System.Runtime.Versioning;
using System.Threading.Tasks;
using Letter.Net.Session;

namespace Letter.Net.Quic;

public interface IQuicConnection
{
    string Id { get; }
    bool Active { get; }
    EndPoint LocalEndPoint { get; }
    EndPoint RemoteEndPoint { get; }
    [RequiresPreviewFeatures]
    ValueTask<ISession> GetInboundAsync(QuicStreamType streamType);
    [RequiresPreviewFeatures]
    ValueTask<ISession> GetOutboundAsync(QuicStreamType streamType);
    ValueTask CloseAsync();
}